<%@page import="model.ProgramList"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="../js/newstart.js"></script>
<script type="text/javascript">
function selectpl(e) {
	var k = $("#"+e.value).text();
	//$("#"+e.value).attr("style","visibility: visible");
	$("#description").text(k);
}
</script>
<link rel="stylesheet" type="text/css" href="../css/newstart.css"/>
</head>
<body>
<div id="set">
	<jsp:include page="logonmenu.jsp"></jsp:include>
	<div id="line">
	<div id="newstart">
	<img src="../newstart.png"height=100>
	</div>
	<form action="newstart.do" method="post" onsubmit="return validationForm(this)">
<fieldset>
		<div id="weight">
			now Weight : <input name="nowWeight" type="text" id="nowWeight" /><br />
			goal Weight : <input name="goalWeight" type="text" id="goalWeight" />
		</div>
		<br />
		<div id="programlist">
			Program List : <select name="programId" onChange="javascript:selectpl(this)">
				<%
					ArrayList<ProgramList> arr = (ArrayList<ProgramList>) request.getAttribute("programList");
					if (arr != null) {
						for (int i = 0; i < arr.size(); i++) {
							out.print("<option value='" + arr.get(i).getProgramid()
									+ "'>" + arr.get(i).getDescription() + "</option>");
						}
					}
				%>
			</select>
		<div id="description"></div>
		</div>
		<button type="submit" class="button yellowgreen">Start</button>
		</fieldset>
	</form>
	<div id="logo">
	<img src="../gogologo.png" width=200, height=200>
	</div>
	</div>
	</div>
			<%
				if(arr != null) {
					for(int i = 0 ; i < arr.size(); i++) {
						out.print("<div id="+ arr.get(i).getProgramid() + " style='visibility: hidden'>" + arr.get(i).getDetaildescription() + "</div>");
					}
				}
			%>
</body>
</html>